## Script (Python) "isShelf"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=
##

try:
    index = context.absolute_url().index('/bookshelf')
    return True
except ValueError:
    came_from = context.REQUEST.get('came_from','')
    try:
        index = came_from.index('/bookshelf/')
        return True
    except ValueError:
        return False
    
